package com.xinpu.mapper;

import com.baomidou.mybatisplus.annotation.SqlParser;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.xinpu.vo.SalesVo;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;
import org.springframework.web.bind.annotation.RequestParam;

@Repository
public interface SalesMapper {
    /**
     * 销售总数
     *
     * @return
     */
    @Select("SELECT COUNT(*) FROM t_sales")
    Integer count();

    /**
     * 获取销售列表
     *
     * @param page
     * @param name
     * @param status
     * @param role
     * @param did
     * @param tenantId
     * @return
     */
    @SqlParser(filter = true)
    IPage<SalesVo> findList(Page page, @Param("name") String name, @Param("status") Integer status, @Param("role") Integer role, @Param("did") Integer did, @Param("tenantId") String tenantId);
}
